- @no_container = true
- page_title "问题"
= render "projects/issues/head"

= content_for :meta_tags do
  - if current_user
    = auto_discovery_link_tag(:atom, namespace_project_issues_url(@project.namespace, @project, :atom, private_token: current_user.private_token), title: "#{@project.name} 问题")

%div{ class: (container_class) }
  - if @project.issues.any?
    .top-area
      = render 'shared/issuable/nav', type: :issues
      .nav-controls
        - if current_user
          = link_to namespace_project_issues_path(@project.namespace, @project, :atom, { private_token: current_user.private_token }), class: 'btn append-right-10' do
            = icon('rss')
            %span.icon-label
              Subscribe
        = render 'shared/issuable/search_form', path: namespace_project_issues_path(@project.namespace, @project)
        - if can? current_user, :create_issue, @project
          = link_to new_namespace_project_issue_path(@project.namespace, @project, issue: { assignee_id: @issuable_finder.assignee.try(:id), milestone_id: @issuable_finder.milestones.try(:first).try(:id) }), class: "btn btn-new", title: "新建问题", id: "new_issue_link" do
            新建问题
    = render 'shared/issuable/filter', type: :issues

    .issues-holder
      = render "issues"
  - else
    .blank-state.blank-state-welcome
      %h2.blank-state-title.blank-state-welcome-title
        欢迎使用GitLab问题跟踪系统
      %p.blank-state-text
        集代码、测试及部署于一身
    .blank-state
      .blank-state-icon
        = custom_icon("issues", size: 50)
      %h3.blank-state-title
        没有找到任何问题。
      %p.blank-state-text
        问题是跟踪项目进度的最佳方式
      - if can? current_user, :create_issue, @project
        = link_to new_namespace_project_issue_path(@project.namespace, @project), class: "btn btn-new", title: "新建问题", id: "new_issue_link" do
          新建问题
